<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      class Person {
        constructor() {
          this.name = "jack";
        }
        say() {
          console.log("hello");
        }
      }

      class Humen extends Person {}

      // 属性复制方法共享
      const p = new Person();
      p.name = "lili";
      const h = new Humen();

      console.log(p, h);
      console.log(p.say === h.say);
    </script>
  </body>
</html>
